package com.fjec.activity.controller;

import com.fjec.activity.entity.InfoUserCashingBank;
import com.fjec.activity.view.ReqUserCashingBank;
import com.fjec.common.protocol.JsonResult;
import com.fjec.common.shiro.AccountInfo;
import com.fjec.common.util.DateUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fjec.activity.service.IInfoUserCashingBankService;

import javax.annotation.Resource;

/**
 * <p>
 * 009.用户代付银行账号信息表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2020-11-14
 */
@RestController
@RequestMapping("/")
public class InfoUserCashingBankController {

    @Resource
    private IInfoUserCashingBankService service;

    /**
     * 代付银行账户信息保存
     *
     * @param infoUserCashingBank
     * @return
     */
    @PostMapping("/y/user/cashing/bank/register")
    public JsonResult registerCashingBank(ReqUserCashingBank infoUserCashingBank) throws Exception {
        return service.registerCashingBank(infoUserCashingBank);
    }

    /**
     * 查询用户代付银行账户信息
     *
     * @return
     * @throws Exception
     */
    @GetMapping("/y/user/cashing/bank/get")
    public JsonResult getUserCashingBank() throws Exception {
        return service.getUserCashingBank();
    }
}
